/*****************************************************************************
 * Copyright (C) Stacy Curl. All rights reserved.                            *
 * ------------------------------------------------------------------------- *
 * The software in this package is published under the terms of the BSD      *
 * style license a copy of which has been included with this distribution in *
 * the LICENSE.txt file.                                                     *
 *****************************************************************************/
package picounit.features.registry;

import picounit.Registry.ImplementationCapturer;

import java.util.LinkedList;
import java.util.List;

public class DefaultImplementationCapturer<B> implements ImplementationCapturer<B> {
	private final List<Entry> entries = new LinkedList<Entry>();

	public <D extends B> ImplementationCapturer<B> add(Class<D> implementation) {
		entries.add(new ClassEntry<B, D>(implementation));

		return this;
	}

	public <D extends B> ImplementationCapturer<B> add(D instance) {
		entries.add(new InstanceEntry<B, D>(instance));

		return this;
	}

	public void done() {
	}
}